import request from "@/utils/request";

// 获取用户试卷列表
export function getPaperList(params) {
    return request({
        url: '/user/exam/paper/list',
        method: 'get',
        params
    })
}

// 获取所有试卷列表
export function getAllPaperList(params) {
    return request({
        url: '/user/exam/paper/allList',
        method: 'get',
        params
    })
}

// 初始化试卷/继续考试
export function toExam(params) {
    return request({
        url: '/user/exam/paper/init',
        method: 'post',
        params
    })
}

// 获取所有试卷列表
export function getPaperById(params) {
    return request({
        url: '/user/exam/paper/info',
        method: 'get',
        params
    })
}

// 获取题目信息
export function getQuInfo(params) {
    return request({
        url: '/user/exam/paper/quInfo',
        method: 'get',
        params
    })
}

// 上传题目答案
export function uploadQuAns(params) {
    return request({
        url: '/user/exam/paper/uploadAns',
        method: 'post',
        params
    })
}

// 交卷
export function submitPaper(params) {
    return request({
        url: '/user/exam/paper/submit',
        method: 'post',
        params
    })
}

// 试卷作答详情
export function examInfo(params) {
    return request({
        url: '/user/exam/paper/examInfo',
        method: 'get',
        params
    })
}

// 试卷题目作答详情
export function ansInfoList(params) {
    return request({
        url: '/user/exam/paper/ansList',
        method: 'get',
        params
    })
}

// 本场考试信息
export function userRank(params) {
    return request({
        url: '/user/exam/paper/userRank',
        method: 'get',
        params
    })
}